<%@ Register TagPrefix="ignav" Namespace="Infragistics.WebUI.UltraWebNavigator" Assembly="Infragistics.WebUI.UltraWebNavigator.v6.1, Version=6.1.20061.1087, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
<%@ Register TagPrefix="igtbl" Namespace="Infragistics.WebUI.UltraWebGrid" Assembly="Infragistics.WebUI.UltraWebGrid.v6.1, Version=6.1.20061.1087, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
<%@ Page language="c#" Codebehind="CustomizeQuote.aspx.cs" AutoEventWireup="false" Inherits="QuoteAdvantage.CustomizeQuote" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
   <HEAD>
      <title>Customize Quote</title>
      <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
      <meta content="C#" name="CODE_LANGUAGE">
      <meta content="JavaScript" name="vs_defaultClientScript">
      <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
      <link href="QuoteAdvantageStyles.css" type="text/css" rel="stylesheet">
      <script type="text/javascript">
         function onFormLoad()
         {
         }
         
         function addItem(strProductId)
         {
            document.Form1.txtProductId.value = strProductId;
            __doPostBack("btnAddItem", "");
            return false;            
         }
         
         function removeItem(strProductId)
         {
            document.Form1.txtProductId.value = strProductId;
            __doPostBack("btnRemoveItem", "");
            return false;            
         }
         
         function customizeItem(strUrl)
         {
            var ctlTree = igtree_getTreeById("ctlTree");
            var selectedNode = ctlTree.getSelectedNode();
            var strTag = selectedNode.getTag();
            document.location = strUrl + "&CategoryId=" + strTag;
            return false;            
         }          
         
         function onPrintClicked()
         {
            window.open("PrintQuote.aspx?QuoteId=<%=objQuote.QuoteId%>", "print", "height=640,width=618,status=0,toolbar=0,menubar=0,scrollbars=1");
            return false;
         }
      </script>
   </HEAD>
   <body class="QuoteAdvantagePage" onload="onFormLoad()" style="MARGIN:0px">
      <form id="Form1" method="post" runat="server">
         <table style="WIDTH:100%; TOP:0px; HEIGHT:100%">
            <tr>
               <td style="WIDTH:240px; HEIGHT:100%">
                  <table style="HEIGHT:100%">
                     <tr style="HEIGHT:16px">
                        <td>
                           <asp:label id="lblProductCategories" runat="server" Width="160px" CssClass="Header">Product Categories</asp:label>
                        </td>
                     </tr>
                     <tr>
                        <td>
                           <ignav:ultrawebtree id="ctlTree" runat="server" Width="280px" Height="100%" ImageDirectory="/ig_common/images/"
                              BackColor="White" BorderColor="DarkGray" BorderStyle="Solid" BorderWidth="1px" CollapseImage="ig_treeXPMinus.gif"
                              DefaultImage="ig_treeXPFolderClosed.gif" Cursor="Default" WebTreeTarget="HierarchicalTree" Indentation="20"
                              ExpandImage="ig_treeXPPlus.gif" DefaultSelectedImage="ig_treeXPFolderOpen.gif" Font-Names="Tahoma"
                              Font-Size="8pt">
                              <HoverNodeStyle Font-Underline="True" ForeColor="DarkBlue"></HoverNodeStyle>
                              <SelectedNodeStyle ForeColor="White" BackColor="#316AC5">
                                 <Padding Bottom="2px" Left="2px" Top="2px" Right="2px"></Padding>
                              </SelectedNodeStyle>
                              <NodePaddings Bottom="1px" Left="1px" Top="1px" Right="1px"></NodePaddings>
                              <Levels>
                                 <ignav:Level Index="0"></ignav:Level>
                                 <ignav:Level Index="1"></ignav:Level>
                              </Levels>
                           </ignav:ultrawebtree>
                        </td>
                     </tr>
                  </table>
               </td>
               <td>
                  <table style="WIDTH:100%; HEIGHT:100%">
                     <tr>
                        <td style="WIDTH:100%; HEIGHT:20px">
                           <table style="WIDTH:100%">
                              <tr>
                                 <td>
                                    <asp:label id="lblAvailableItemsInCategory" runat="server" CssClass="Header" Width="100%">Available Items in Category:</asp:label>
                                 </td>
                                 <td style="WIDTH:80px; TEXT-ALIGN:right">
                                    <asp:imagebutton id="btnDiscount" runat="server" ImageUrl="CustomDiscount.gif" ToolTip="Discounting"></asp:imagebutton>
                                    <asp:imagebutton id="btnPrint" runat="server" ToolTip="Generate Proposal" ImageUrl="Print.gif"></asp:imagebutton>
                                    <a href="Support.aspx" target="_blank" style="PADDING-LEFT:4px"><IMG class="ImageLink" id="imgLogo" title="QuoteAdvantage Support" height="15" alt=""
                                          src="QuoteAdvantageSmall.gif" width="14"></a>
                                 </td>
                              </tr>
                           </table>
                        </td>
                     </tr>
                     <tr>
                        <td style="WIDTH:100%; HEIGHT:192px">
                           <igtbl:ultrawebgrid id="gridAvailableProducts2" runat="server" Width="100%" ImageDirectory="/ig_common/Images/"
                              Height="192px">
                              <DisplayLayout ColWidthDefault="" AutoGenerateColumns="False" RowHeightDefault="20px" Version="4.00"
                                 ScrollBarView="Vertical" AllowColSizingDefault="Free" RowSelectorsDefault="No" Name="gridAvailableProducts2"
                                 TableLayout="Fixed" CellClickActionDefault="RowSelect">
                                 <AddNewBox>
                                    <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">

<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White">
</BorderDetails>

                                    </Style>
                                 </AddNewBox>
                                 <Pager>
                                    <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">

<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White">
</BorderDetails>

                                    </Style>
                                 </Pager>
                                 <HeaderStyleDefault VerticalAlign="Middle" BorderStyle="Inset" HorizontalAlign="Left" BackColor="#E0E3E8"
                                    Height="22px">
                                    <BorderDetails ColorTop="DarkGray" WidthLeft="1px" ColorBottom="DarkGray" WidthTop="1px" WidthRight="2px"
                                       WidthBottom="2px"></BorderDetails>
                                 </HeaderStyleDefault>
                                 <FrameStyle Width="100%" Font-Size="8.5pt" Font-Names="Tahoma" BorderColor="#466094" BorderStyle="Solid"
                                    BackColor="White" Height="192px">
                                    <BorderDetails WidthLeft="1px" WidthTop="0px" WidthRight="1px" WidthBottom="1px"></BorderDetails>
                                 </FrameStyle>
                                 <FooterStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">
                                    <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>
                                 </FooterStyleDefault>
                                 <EditCellStyleDefault BorderWidth="0px" BorderStyle="None"></EditCellStyleDefault>
                                 <RowStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="White">
                                    <Padding Left="3px"></Padding>
                                    <BorderDetails WidthLeft="0px" ColorBottom="LightGray" WidthTop="0px" ColorRight="White"></BorderDetails>
                                 </RowStyleDefault>
                              </DisplayLayout>
                              <Bands>
                                 <igtbl:UltraGridBand>
                                    <Columns>
                                       <igtbl:UltraGridColumn Width="55px" Type="HyperLink">
                                          <CellStyle CustomRules="color:red;" CssClass="LinkColumn"></CellStyle>
                                          <Footer Key=""></Footer>
                                          <Header Key=""></Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Name" BaseColumnName="Name">
                                          <CellStyle TextOverflow="Ellipsis"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Name">
                                             <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Product ID" Width="85px" BaseColumnName="ProductNumber">
                                          <CellStyle TextOverflow="Ellipsis"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="2"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Product ID">
                                             <RowLayoutColumnInfo OriginX="2"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Cost" Width="80px" BaseColumnName="StandardCost">
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="3"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Cost">
                                             <RowLayoutColumnInfo OriginX="3"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="List Price" Width="80px" BaseColumnName="ListPrice">
                                          <CellStyle TextOverflow="Ellipsis"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="4"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="List Price">
                                             <RowLayoutColumnInfo OriginX="4"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Price" Width="80px" BaseColumnName="Price">
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="5"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Price">
                                             <RowLayoutColumnInfo OriginX="5"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                    </Columns>
                                 </igtbl:UltraGridBand>
                              </Bands>
                           </igtbl:ultrawebgrid>
                        </td>
                     </tr>
                     <tr>
                        <td style="HEIGHT:20px">
                           <asp:label id="lblCustomizableProducts" runat="server" CssClass="Header" Width="208px">Customizable Products on Quote</asp:label>
                        </td>
                     </tr>
                     <tr>
                        <td style="WIDTH:100%">
                           <igtbl:ultrawebgrid id="gridQuoteItems2" runat="server" Width="100%" ImageDirectory="/ig_common/Images/"
                              Height="100%">
                              <DisplayLayout ColWidthDefault="" AutoGenerateColumns="False" RowHeightDefault="20px" Version="4.00"
                                 BorderCollapseDefault="Separate" AllowColSizingDefault="Free" RowSelectorsDefault="No" Name="gridQuoteItems2"
                                 TableLayout="Fixed" CellClickActionDefault="RowSelect">
                                 <AddNewBox>
                                    <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">

<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White">
</BorderDetails>

                                    </Style>
                                 </AddNewBox>
                                 <Pager>
                                    <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">

<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White">
</BorderDetails>

                                    </Style>
                                 </Pager>
                                 <HeaderStyleDefault VerticalAlign="Middle" BorderStyle="Inset" HorizontalAlign="Left" BackColor="#E0E3E8"
                                    Height="32px">
                                    <BorderDetails ColorTop="DarkGray" WidthLeft="1px" ColorBottom="DarkGray" WidthTop="1px" WidthRight="2px"
                                       WidthBottom="2px"></BorderDetails>
                                 </HeaderStyleDefault>
                                 <FrameStyle Width="100%" Font-Size="8.5pt" Font-Names="Tahoma" BorderColor="#466094" BorderStyle="Solid"
                                    BackColor="White" Height="100%">
                                    <BorderDetails WidthLeft="1px" WidthTop="0px" WidthRight="1px" WidthBottom="1px"></BorderDetails>
                                 </FrameStyle>
                                 <FooterStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">
                                    <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>
                                 </FooterStyleDefault>
                                 <EditCellStyleDefault BorderWidth="0px" BorderStyle="None"></EditCellStyleDefault>
                                 <RowStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="White">
                                    <Padding Left="3px"></Padding>
                                    <BorderDetails WidthLeft="0px" ColorBottom="LightGray" WidthTop="0px" ColorRight="White"></BorderDetails>
                                 </RowStyleDefault>
                              </DisplayLayout>
                              <Bands>
                                 <igtbl:UltraGridBand>
                                    <Columns>
                                       <igtbl:UltraGridColumn HeaderText="Name" ChangeLinksColor="True" BaseColumnName="Name">
                                          <CellButtonStyle CssClass="GridLink"></CellButtonStyle>
                                          <CellStyle TextOverflow="Ellipsis" CssClass="LinkColumn"></CellStyle>
                                          <Footer Key=""></Footer>
                                          <Header Key="" Caption="Name"></Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Custom 1" Hidden="True" BaseColumnName="ProductCustomField1">
                                          <CellStyle TextOverflow="Ellipsis"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Custom 1">
                                             <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Base Price" Width="80px" Format="" BaseColumnName="PricePerUnit">
                                          <CellStyle HorizontalAlign="Right"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="2"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Base Price">
                                             <RowLayoutColumnInfo OriginX="2"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Qty" Width="28px" BaseColumnName="Quantity" AllowUpdate="Yes">
                                          <CellStyle HorizontalAlign="Right" BackColor="PaleTurquoise"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="3"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Qty">
                                             <RowLayoutColumnInfo OriginX="3"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Discount" Width="50px" AllowUpdate="Yes">
                                          <CellStyle HorizontalAlign="Right" BackColor="PaleTurquoise"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="4"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Discount">
                                             <RowLayoutColumnInfo OriginX="4"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Discount %" Width="65px" BaseColumnName="PercentDiscount" AllowUpdate="Yes">
                                          <CellStyle HorizontalAlign="Right" BackColor="PaleTurquoise"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="5"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Discount %">
                                             <RowLayoutColumnInfo OriginX="5"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Markup %" Width="60px" BaseColumnName="PercentMarkup" AllowUpdate="Yes">
                                          <CellStyle HorizontalAlign="Right" BackColor="PaleTurquoise"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="6"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Markup %">
                                             <RowLayoutColumnInfo OriginX="6"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Custom 2" Hidden="True" BaseColumnName="ProductCustomField2">
                                          <CellStyle TextOverflow="Ellipsis"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="7"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Custom 2">
                                             <RowLayoutColumnInfo OriginX="7"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn HeaderText="Customized&lt;br&gt;Price" Width="80px" Format="###,###,##0.00">
                                          <CellStyle HorizontalAlign="Right"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="8"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="" Caption="Customized&lt;br&gt;Price">
                                             <RowLayoutColumnInfo OriginX="8"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                       <igtbl:UltraGridColumn Width="45px" Type="HyperLink">
                                          <CellStyle CustomRules="color:red;" CssClass="LinkColumn"></CellStyle>
                                          <Footer Key="">
                                             <RowLayoutColumnInfo OriginX="9"></RowLayoutColumnInfo>
                                          </Footer>
                                          <Header Key="">
                                             <RowLayoutColumnInfo OriginX="9"></RowLayoutColumnInfo>
                                          </Header>
                                       </igtbl:UltraGridColumn>
                                    </Columns>
                                 </igtbl:UltraGridBand>
                              </Bands>
                           </igtbl:ultrawebgrid>
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
         <asp:button id="btnRemoveItem" style="LEFT:0px; VISIBILITY:hidden; POSITION:absolute; TOP:0px"
            runat="server" Text="Remove"></asp:button>
         <asp:button id="btnAddItem" style="LEFT:0px; VISIBILITY:hidden; POSITION:absolute; TOP:0px"
            runat="server" Text="Add"></asp:button>
         <asp:textbox id="txtProductId" style="LEFT:0px; VISIBILITY:hidden; POSITION:absolute; TOP:0px"
            runat="server" Width="120px"></asp:textbox>
      </form>
   </body>
</HTML>
